< previous page page_466 next page >

Page 466
0466-01.jpg
Figure 12.12.
Adding a record to the data grid.
Setting Other Design-Time Properties of the Data Grid
A problem with resizing the form at runtime is that the moment you close the form, all the column settings are lost. You can prevent this problem by resizing the form at design time. Select the data grid control and press the alternate mouse button. This brings up the context menu. Select RetrieveFields. This loads the column names of the data set into the grid control. Next, select Edit from the context menu. Now you can resize the columns of the control. The dimensions of these columns are stored in the control and used each time the form is loaded.
You can modify the names of the column headers at design time by using the built-in tabbed property sheet. To do this, click the alternate mouse button while the grid control is selected. When the context menu appears, select Properties from this menu. You should now see a series of tabs that allow you to set several grid-level and column-level properties. (See Figure 12.13.)
0466-02.jpg
Figure 12.13.
Using the data grid tabbed properties page.

 
< previous page page_466 next page >

If you like this book, buy it!